package com.lightjet.macross.base.auth.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;

@FeignClient(value = "base-auth")
public interface BaseAuthRemoteClient {

    @PostMapping("/oauth/token")
    public HashMap GetToken(
            @RequestParam(name = "client_id") String client_id,
            @RequestParam(name = "client_secret") String client_secret,
            @RequestParam(name = "username",required = false) String username,
            @RequestParam(name = "password",required = false) String password,
            @RequestParam(name = "scope",required = false) String scope,
            @RequestParam(name = "refresh_token",required = false) String refresh_token,
            @RequestParam(name = "grant_type") String grant_type
    );

}